package com.sip.stream.utils.zfy.config;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;

public class ZFYMediaConfig {
    public static final int BITRATE_HIGH = 0;
    public static final int BITRATE_LOW = 2;
    public static final int BITRATE_MIDDLE = 1;
    public static final int BITRATE_XHIGH = 3;
    public static final int ENCRYPT_HEADER = 1;
    public static final int ENCRYPT_NONE = 0;
    public static final int VIDEOMUXER_DEFAULT = 0;
    public static final int VIDEOMUXER_YUV = 1;

    //定时拍照
    @SerializedName("captureTimer")
    private String captureTimer;

    //视频延录
    @SerializedName("videoDelayTime")
    private int videoDelayTime;

    //录制宽度
    @SerializedName("videoWidth")
    private int videoWidth = 1920;

    //录制高度
    @SerializedName("videoHeight")
    private int videoHeight = 1080;

    //前置PPI
    @SerializedName("videoFrontPPI")
    private String videoFrontPPI = "5M";

    //录制帧率
    @SerializedName("videoFPS")
    private int videoFPS = 25;

    @SerializedName("fakeVideoFPS")
    private int fakeVideoFPS = 25;

    @SerializedName("VideoBitRate")
    private float VideoBitRate = 0.07f;

    //录像比特率类型 0: 高 1：中 2：低
    @SerializedName("VideoBitType")
    private int VideoBitType = 0;

    //video/hevc ：H265  video/avc : H264
    @SerializedName("videoMinetype")
    private String videoMinetype = "video/avc";

    //网传视频宽
    @SerializedName("streamWidth")
    private int streamWidth = 1920;

    //网传视频宽高
    @SerializedName("streamHeight")
    private int streamHeight = 1080;

    @SerializedName("fakeStreamFPS")
    private int fakeStreamFPS = 30;

    //网传帧率
    @SerializedName("streamFPS")
    private int streamFPS = 15;

    //网传比特率
    @SerializedName("streamBitRate")
    private int streamBitRate = 2048;

    //重置流码率
    @SerializedName("resetStreamBitRate")
    private int resetStreamBitRate = 2048;

    @SerializedName("streamMinetype")
    private String streamMinetype = "video/avc";

    //镜头最大缩放比例
    @SerializedName("maxZoom")
    private int maxZoom = 2;

    //分段录像 10分钟 20 分钟 30分钟
    @SerializedName("videoSepTime")
    private int videoSepTime = 10;

    //视频预录
    private int videoPreTime = 15;

    @SerializedName("captureDesWidth")
    private int captureDesWidth = 5360;

    //连拍张数
    @SerializedName("captureMutiCount")
    private int captureMutiCount = 1;

    //连拍间隔
    @SerializedName("captureMutiSepTime")
    private int captureMutiSepTime = 2;

    //延迟拍照
    private int captureDelay = 0;

    //音频采样率
    @SerializedName("audioSampleRate")
    private int audioSampleRate = 16000;

    //音频通道数量
    @SerializedName("audioChanelCount")
    private int audioChanelCount = 1;

    //音频格式
    @SerializedName("audioFormate")
    private int audioFormate = 2;

    //循环录像
    @SerializedName("videoRecycle")
    private boolean videoRecycle = false;

    //视频数据加密
    @SerializedName("videoProtect")
    private boolean videoProtect = false;

    //紧急摄录
    @SerializedName("knockProtect")
    private boolean knockProtect = false;

    //开机开始录像
    @SerializedName("bootRecord")
    private boolean bootRecord = false;

    //OSD 定位信息
    @SerializedName("osdLocation")
    private boolean osdLocation = true;

    //OSD 时间
    @SerializedName("osdTime")
    private boolean osdTime = true;

    //OSD 设备信息
    @SerializedName("osdDeviceInfo")
    private boolean osdDeviceInfo = true;

    //OSD 设备状态
    @SerializedName("osdDeviceStatus")
    private boolean osdDeviceStatus = false;

    //OSD 测试
    @SerializedName("osdTest")
    private boolean osdTest = false;

    //OSD 反色
    @SerializedName("osdInvert")
    private boolean osdInvert = true;

    @SerializedName("interruptProtect")
    private boolean interruptProtect = false;

    //网传自动录制
    @SerializedName("autoVideoWhenRemote")
    private boolean autoVideoWhenRemote = false;

    @SerializedName("afMode")
    private boolean afMode = false;

    @SerializedName("wideAngleIntMode")
    private int wideAngleIntMode = 0;

    @SerializedName("wideAngleDistortion")
    private int wideAngleDistortion = 0;

    //动态码流 false: 固定码流 true: 动态码流
    @SerializedName("dynamicRemoteStream")
    private boolean dynamicRemoteStream = false;

    @SerializedName("frontCameraStream")
    private boolean frontCameraStream = false;

    //前置摄像头视频
    @SerializedName("frontCameraVideo")
    private boolean frontCameraVideo = false;

    //视频混流模式
    @SerializedName("videoMuxerMode")
    private int videoMuxerMode = 0;

    @SerializedName("imageStablization")
    private boolean imageStablization = false;

    @SerializedName("hdr")
    private boolean hdr = false;

    //复合流 true: 复合流 false: 视频流
    @SerializedName("dualStream")
    private boolean dualStream = true;

    //录像时长播报
    @SerializedName("tellRecordingTime")
    private boolean tellRecordingTime = true;

    //回声消除
    @SerializedName("AcousticEchoCanceler")
    private boolean acousticEchoCanceler = true;

    //噪音抑制
    @SerializedName("NoiseSuppressor")
    private boolean noiseSuppressor = true;

    @SerializedName("debugEffect")
    private boolean debugEffect = false;

    @SerializedName("dualRecording")
    private boolean dualRecording = false;

    @SerializedName("videoEncrypt")
    private int videoEncrypt = 0;

    //配置级别
    @SerializedName("configLevel")
    private int configLevel = 5;



    public String getVideoFrontPPI() {
        return this.videoFrontPPI;
    }

    public void setVideoFrontPPI(String videoFrontPPI) {
        this.videoFrontPPI = videoFrontPPI;
    }

    public boolean isOsdTest() {
        return this.osdTest;
    }

    public void setOsdTest(boolean osdTest) {
        this.osdTest = osdTest;
    }

    public boolean isOsdInvert() {
        return this.osdInvert;
    }

    public void setOsdInvert(boolean osdInvert) {
        this.osdInvert = osdInvert;
    }

    public boolean isImageStablization() {
        return this.imageStablization;
    }

    public void setImageStablization(boolean imageStablization) {
        this.imageStablization = imageStablization;
    }

    public boolean isDebugEffect() {
        return this.debugEffect;
    }

    public void setDebugEffect(boolean debugEffect) {
        this.debugEffect = debugEffect;
    }

    public boolean isAutoVideoWhenRemote() {
        return this.autoVideoWhenRemote;
    }

    public void setAutoVideoWhenRemote(boolean autoVideoWhenRemote) {
        this.autoVideoWhenRemote = autoVideoWhenRemote;
    }

    public boolean isDualRecording() {
        return this.dualRecording;
    }

    public void setDualRecording(boolean dualRecording) {
        this.dualRecording = dualRecording;
    }

    public boolean isAfMode() {
        return this.afMode;
    }

    public void setAfMode(boolean afMode) {
        this.afMode = afMode;
    }

    public boolean isDynamicRemoteStream() {
        return this.dynamicRemoteStream;
    }

    public void setDynamicRemoteStream(boolean dynamicRemoteStream) {
        this.dynamicRemoteStream = dynamicRemoteStream;
    }

    public boolean isFrontCameraStream() {
        return this.frontCameraStream;
    }

    public void setFrontCameraStream(boolean frontCameraStream) {
        this.frontCameraStream = frontCameraStream;
    }

    public boolean isWideAngleMode() {
        return this.wideAngleIntMode == 0;
    }

    public int getWideAngleIntMode() {
        return this.wideAngleIntMode;
    }

    public void setWideAngleMode(boolean wideAngleIntMode) {
        this.wideAngleIntMode = !wideAngleIntMode ? 1 : 0;
    }

    public void setWideAngleIntMode(int wideAngleIntMode) {
        this.wideAngleIntMode = wideAngleIntMode;
    }

    public boolean isFrontCameraVideo() {
        return this.frontCameraVideo;
    }

    public void setFrontCameraVideo(boolean frontCameraVideo) {
        this.frontCameraVideo = frontCameraVideo;
    }

    public int getConfigLevel() {
        return this.configLevel;
    }

    public void setConfigLevel(int configLevel) {
        this.configLevel = configLevel;
    }

    public int getWideAngleDistortion() {
        return this.wideAngleDistortion;
    }

    public void setWideAngleDistortion(int wideAngleDistortion) {
        this.wideAngleDistortion = wideAngleDistortion;
    }

    public int getResetStreamBitRate() {
        return this.resetStreamBitRate;
    }

    public void setResetStreamBitRate(int resetStreamBitRate) {
        this.resetStreamBitRate = resetStreamBitRate;
    }

    public int getVideoEncrypt() {
        return this.videoEncrypt;
    }

    public void setVideoEncrypt(int videoEncrypt) {
        this.videoEncrypt = videoEncrypt;
    }

    public boolean isDualStream() {
        return this.dualStream;
    }

    public int getStreamWidth() {
        return this.dualStream ? this.streamWidth : this.videoWidth;
    }

    public int getStreamHeight() {
        return this.dualStream ? this.streamHeight : this.videoHeight;
    }

    public int getStreamFPS() {
        return this.dualStream ? this.streamFPS : this.videoFPS;
    }

    public String getStreamMinetype() {
        return this.dualStream ? this.streamMinetype : this.videoMinetype;
    }

    public int getVideoWidth() {
        return this.videoWidth;
    }

    public void setVideoWidth(int videoWidth) {
        this.videoWidth = videoWidth;
    }

    public int getVideoHeight() {
        return this.videoHeight;
    }

    public void setVideoHeight(int videoHeight) {
        this.videoHeight = videoHeight;
    }

    public int getVideoFPS() {
        return this.videoFPS;
    }

    public void setVideoFPS(int videoFPS) {
        this.videoFPS = videoFPS;
    }

    public int getFakeVideoFPS() {
        return this.fakeVideoFPS;
    }

    public void setFakeVideoFPS(int fakeVideoFPS) {
        this.fakeVideoFPS = fakeVideoFPS;
    }

    public float getVideoBitRate() {
        return this.VideoBitRate;
    }

    public void setVideoBitRate(float videoBitRate) {
        this.VideoBitRate = videoBitRate;
    }

    public int getVideoBitType() {
        return this.VideoBitType;
    }

    public void setVideoBitType(int videoBitType) {
        this.VideoBitType = videoBitType;
    }

    public String getVideoMinetype() {
        return this.videoMinetype;
    }

    public void setVideoMinetype(String videoMinetype) {
        this.videoMinetype = videoMinetype;
    }

    public void setStreamWidth(int streamWidth) {
        this.streamWidth = streamWidth;
    }

    public void setStreamHeight(int streamHeight) {
        this.streamHeight = streamHeight;
    }

    public int getFakeStreamFPS() {
        return this.fakeStreamFPS;
    }

    public void setFakeStreamFPS(int fakeStreamFPS) {
        this.fakeStreamFPS = fakeStreamFPS;
    }

    public void setStreamFPS(int streamFPS) {
        this.streamFPS = streamFPS;
    }

    public int getStreamBitRate() {
        return this.streamBitRate;
    }

    public void setStreamBitRate(int streamBitRate) {
        this.streamBitRate = streamBitRate;
    }

    public void setStreamMinetype(String streamMinetype) {
        this.streamMinetype = streamMinetype;
    }

    public int getMaxZoom() {
        return this.maxZoom;
    }

    public void setMaxZoom(int maxZoom) {
        this.maxZoom = maxZoom;
    }

    public int getVideoSepTime() {
        return this.videoSepTime;
    }

    public void setVideoSepTime(int videoSepTime) {
        this.videoSepTime = videoSepTime;
    }

    public int getVideoPreTime() {
        return this.videoPreTime;
    }

    public void setVideoPreTime(int videoPreTime) {
        this.videoPreTime = videoPreTime;
    }

    public int getVideoDelayTime() {
        return this.videoDelayTime;
    }

    public void setVideoDelayTime(int videoDelayTime) {
        this.videoDelayTime = videoDelayTime;
    }

    public int getCaptureDesWidth() {
        return this.captureDesWidth;
    }

    public void setCaptureDesWidth(int captureDesWidth) {
        this.captureDesWidth = captureDesWidth;
    }

    public void setCaptureMutiCount(int captureMutiCount) {
        this.captureMutiCount = captureMutiCount;
    }

    public int getCaptureMutiSepTime() {
        return this.captureMutiSepTime;
    }

    public void setCaptureMutiSepTime(int captureMutiSepTime) {
        this.captureMutiSepTime = captureMutiSepTime;
    }

    public int getCaptureDelay() {
        return this.captureDelay;
    }

    public void setCaptureDelay(int captureDelay) {
        this.captureDelay = captureDelay;
    }

    public String getCaptureTimer() {
        return this.captureTimer;
    }

    public void setCaptureTimer(String captureTimer) {
        this.captureTimer = captureTimer;
    }

    public int getAudioSampleRate() {
        return this.audioSampleRate;
    }

    public void setAudioSampleRate(int audioSampleRate) {
        this.audioSampleRate = audioSampleRate;
    }

    public int getAudioChanelCount() {
        return this.audioChanelCount;
    }

    public void setAudioChanelCount(int audioChanelCount) {
        this.audioChanelCount = audioChanelCount;
    }

    public int getAudioFormate() {
        return this.audioFormate;
    }

    public void setAudioFormate(int audioFormate) {
        this.audioFormate = audioFormate;
    }

    public boolean isVideoRecycle() {
        return this.videoRecycle;
    }

    public void setVideoRecycle(boolean videoRecycle) {
        this.videoRecycle = videoRecycle;
    }

    public boolean isVideoProtect() {
        return this.videoProtect;
    }

    public void setVideoProtect(boolean videoProtect) {
        this.videoProtect = videoProtect;
    }

    public boolean isKnockProtect() {
        return this.knockProtect;
    }

    public void setKnockProtect(boolean knockProtect) {
        this.knockProtect = knockProtect;
    }

    public boolean isBootRecord() {
        return this.bootRecord;
    }

    public void setBootRecord(boolean bootRecord) {
        this.bootRecord = bootRecord;
    }

    public boolean isOsdLocation() {
        return this.osdLocation;
    }

    public void setOsdLocation(boolean osdLocation) {
        this.osdLocation = osdLocation;
    }

    public boolean isOsdTime() {
        return this.osdTime;
    }

    public void setOsdTime(boolean osdTime) {
        this.osdTime = osdTime;
    }

    public boolean isOsdDeviceInfo() {
        return this.osdDeviceInfo;
    }

    public void setOsdDeviceInfo(boolean osdDeviceInfo) {
        this.osdDeviceInfo = osdDeviceInfo;
    }

    public boolean isOsdDeviceStatus() {
        return this.osdDeviceStatus;
    }

    public void setOsdDeviceStatus(boolean osdDeviceStatus) {
        this.osdDeviceStatus = osdDeviceStatus;
    }

    public boolean isInterruptProtect() {
        return this.interruptProtect;
    }

    public void setInterruptProtect(boolean interruptProtect) {
        this.interruptProtect = interruptProtect;
    }

    public int getVideoMuxerMode() {
        return this.videoMuxerMode;
    }

    public void setVideoMuxerMode(int videoMuxerMode) {
        this.videoMuxerMode = videoMuxerMode;
    }

    public boolean isHdr() {
        return this.hdr;
    }

    public void setHdr(boolean hdr) {
        this.hdr = hdr;
    }

    public void setDualStream(boolean dualStream) {
        this.dualStream = dualStream;
    }

    public boolean isTellRecordingTime() {
        return this.tellRecordingTime;
    }

    public void setTellRecordingTime(boolean tellRecordingTime) {
        this.tellRecordingTime = tellRecordingTime;
    }

    public boolean isAcousticEchoCanceler() {
        return this.acousticEchoCanceler;
    }

    public void setAcousticEchoCanceler(boolean acousticEchoCanceler) {
        this.acousticEchoCanceler = acousticEchoCanceler;
    }

    public boolean isNoiseSuppressor() {
        return this.noiseSuppressor;
    }

    public void setNoiseSuppressor(boolean noiseSuppressor) {
        this.noiseSuppressor = noiseSuppressor;
    }

    public int getCaptureMutiCount() {
        if (this.captureDesWidth > 10000) {
            return 1;
        }
        if (this.captureMutiCount < 1) {
            this.captureMutiCount = 1;
        }
        return this.captureMutiCount;
    }

    public String toString() {
        return new Gson().toJson(this);
    }
}
